package com.zjm.creational.factory_method.pizzastore.order;

import com.zjm.creational.factory_method.pizzastore.pizza.*;


public class LDOrderPizza extends OrderPizza {

    /**
     * 实现OrderPizza的抽象方法
     * @param orderType
     * @return
     */
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new LDCheesePizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
